Quantum theory explained